package cl.mt.util.quartz.task;

import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;
 
public class SchedulerJob extends QuartzJobBean
{
	
	private transient Logger log = LogManager.getLogger(SchedulerJob.class.getName());

	private SchedulerTask schedulerTask;
 
	public void setSchedulerTask(SchedulerTask schedulerTask) {
		log.info("setSchedulerTask..........");
		this.schedulerTask = schedulerTask;
	}

	protected void executeInternal(JobExecutionContext context)
	throws JobExecutionException {
		log.info("Agendo Tarea schedulerTask..........");
		schedulerTask.recargaDatos();
	 	
	}
}